package com.bifang.module.file.dao.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 文件服务阿里云访问表
 *
 * @author chenzh
 * @since 2021-11-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("FILE_ALIOSS")
@Schema(title ="FileAlioss对象", description = "文件服务阿里云访问表")
public class FileAlioss extends Model<FileAlioss> {

    private static final long serialVersionUID = 1L;

    @Schema(title = "文件查看id")
    @TableId(value = "SHOW_ID", type = IdType.INPUT)
    private String showId;

    @Schema(title = "阿里云url")
    @TableField("FILE_URL")
    private String fileUrl;

    @Schema(title = "过期时间")
    @TableField("EXPIRE_TIME")
    private Long expireTime;

    @Schema(title = "创建人")
    @TableField(value = "CREATE_NAME", fill = FieldFill.INSERT)
    private String createName;

    @Schema(title = "创建时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(title = "更新人")
    @TableField(value = "UPDATE_NAME", fill = FieldFill.INSERT_UPDATE)
    private String updateName;

    @Schema(title = "更新时间")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(title = "逻辑删除标志 0 未删除 1 删除")
    @TableField(value = "DEL", fill = FieldFill.INSERT)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.showId;
    }
}
